package com.yunchang.springboot.mapper.finance;

import com.yunchang.springboot.models.DO.finance.FinanceExchangeRate;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

public interface FinanceExchangeRateMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(FinanceExchangeRate record);

    int insertSelective(FinanceExchangeRate record);

    FinanceExchangeRate selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(FinanceExchangeRate record);

    int updateByPrimaryKey(FinanceExchangeRate record);

    /**
     * 根据币种和时间获得汇率
     * */
    BigDecimal getExchangeRateByCurrencyAndDate(@Param("currency")String currency, @Param("year")Integer year, @Param("month")Integer month);
}